package com.tj.shopping.service.impl;

import com.tj.shopping.entity.Orderdetail;
import com.tj.shopping.mapper.OrderDetailMapper;
import com.tj.shopping.mapper.OrderMapper;
import com.tj.shopping.service.IOrderDetailService;
import com.tj.shopping.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

public class OrderDetailServiceImpl implements IOrderDetailService {
    private OrderDetailMapper mapper;
    @Override
    public int add(Orderdetail orderdetail) {
        SqlSession session = MybatisUtil.getSession(true);
        mapper = session.getMapper(OrderDetailMapper.class);
        return mapper.add(orderdetail);
    }
}
